package com.briup.ch08;
class MyClass<T>{
    private T name;
    public void set(T name){
        this.name=name;
    }
    public T get() {
        return name;
    }
}
public class Generics {
    public static void main(String[] args) {
        MyClass c1=new MyClass();
        c1.set("Jack");
        System.out.println(c1.get());
        c1.set(1);
        System.out.println(c1.get());
        MyClass<Integer> c2=new MyClass<>();
        c2.set(100);
        System.out.println(c2.get());



    }
}
